package cn.edu.jlu.grid.vjm;

import java.util.Vector;


public class VJMPIRun {
	public static void main(String[] args) {
		VJMCenter.init();
		
		VJMPIJob job = new VJMPIJob(5, "/opt/mpich-1.2.6/examples/cpi");
		
		job.reserveResource();
		job.waitForAllVjobsAvailable();
		
		Vector<VJob> vjobs = job.getAllAvailableVJobs();
		for(VJob tmp : vjobs) {
			System.out.println(tmp);
		}
		
		job.request();
		
		VJMCenter.release();
	}
}
